
Run test_printf_1 at the command prompt.
   $ ./test_printf_1
How do you explain the result?


Run test_printf_2 at the command prompt.
   $ ./test_printf_2
Then run it again with all its output redirected to a file.
   $ ./test_printf_2  2&> temp.txt
How do you explain the difference between the two results?   


Run test_printf_3 at the command prompt and notice how long it takes to run.
   $ ./test_printf_3
Then run it again with its output redirected to a file.
   $ ./test_printf_3  > temp.txt
How do you explain the difference in speed?


Run test_printf_4 at the command prompt with its
output redirect to a file. Notice how long it
takes to run.
   $ ./test_printf_4  > temp.txt
Then uncomment the call to setbuf(), recompile and run it again.
   $ ./test_printf_4  > temp.txt
How do you explain the difference in speed?


Run test_printf_5 at the command prompt.
   $ ./test_printf_5
Then uncomment the calls to setbuf(), recompile and run it again.
   $ ./test_printf_5
Then comment out the calls to setbuf(), uncomment the calls to
setvbuf(), recompile and run it again.
   $ ./test_printf_5
Be sure to do this experiment in both Windows and Linux (WSL).
Try setting the buffer sizes to various small multiples of 4.


Be sure to run test_printf_6 using both Windows and Linux (WSL).
